<?php
/**
 * Created by PhpStorm.
 * User: xiaxiang
 * Date: 2019/6/6
 * Time: 15:32
 */

namespace app\admin\validate;


use think\Validate;

class ConfValidate extends Validate
{
    //TODO unique
    protected $rule = [
        'cname|中文名'    => 'require|max:60|unique:config',
        'ename|英文名'    => 'require|max:60|unique:config',
        'dt_type|配置类型' => 'require|number',
        'cf_type|配置分类' => 'require|number',
    ];

    protected $scene=[
        'add' => ['cname','ename']
    ];
}